package com.echat.messagesender.sender.model;

import com.sun.javafx.beans.IDProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import java.time.LocalDateTime;

/**
 * Created by chenmohan on 2018/09/06
 *
 * @description
 */
@Data
public class PlatformAccount {
    @Id
    private Long id;

    private Long userId;

    private Integer platformId;

    private String memo;

    @Column(name="create_datetime")
    private LocalDateTime createTime;

    @Column(name="modify_datetime")
    private LocalDateTime modifyTime;

    /**
     * 判断该平台是否是系统拥有的(所有用户都能使用该账号发送邮件短信)
     * @return
     */
    public boolean isGlobal(){
        return userId == 0;
    }
}
